package io.kiki.sba.registry.server.data_store.change;


import io.kiki.sba.registry.common.model.TraceTimes;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Setter
@Getter
public class DataChangeEvent {
    private final String dataCenter;
    private final List<String> dataInfoIds;
    private final TraceTimes traceTimes;

    public DataChangeEvent(String dataCenter, List<String> dataInfoIds, TraceTimes parentTimes) {
        this.dataCenter = dataCenter;
        this.dataInfoIds = Collections.unmodifiableList(new ArrayList<>(dataInfoIds));
        traceTimes = parentTimes.copy();
    }


}
